package myapps.ttclient.protocol.message.powerpoint;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import myapps.ttclient.GlobalVariables;
import myapps.ttclient.Helper;
import myapps.ttclient.baseclass_and_interface.TTClientMessage;


public class PPTGotoSlideRequestMessage extends TTClientMessage
{
	public String temporaryKey = "";
	
	public int SlideIndex = -1;

	public PPTGotoSlideRequestMessage(String temporaryKey, int slideIndex)
	{
		this.temporaryKey = temporaryKey;
		this.SlideIndex = slideIndex;
	}

	public static TTClientMessage parse(DataInputStream dis) throws IOException
	{
		throw new IOException("NotImplementedException");
	}

	@Override
	public void toDataOutputStream(DataOutputStream dos) throws IOException
	{
		dos.writeByte(PPT_GO_TO_SLIDE);
		dos.writeInt(GlobalVariables.NO_LENGTH_CODE);
		
		Helper.WriteStringToDataOutputStream(dos, this.temporaryKey);
		
		dos.writeInt(this.SlideIndex);
	}
}

